//
//  MessageCell.h
//  BaiTengIM
//
//  Created by awh on 2019/6/29.
//  Copyright © 2019 awh. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "MessageBubbleView.h"

#import "BTMessageModel.h"

@protocol MessageCellDelegate;
NS_ASSUME_NONNULL_BEGIN

@interface MessageCell : UITableViewCell

@property (nonatomic, strong, readonly) MessageBubbleView *bubbleView;
@property(nonatomic, assign) MessageDirection messageDirection;
@property(nonatomic, strong) BTMessageModel *model;
@property(nonatomic, weak) id<MessageCellDelegate> delegate;

+ (NSString *)cellIdentifierWithDirection:(MessageDirection)messageDirection
                                     type:(MessageType)messageType;

- (instancetype)initWithDirection:(MessageDirection)messageDirection
                             type:(MessageType)messageType;

@end


@protocol MessageCellDelegate <NSObject>

@optional

- (void)messageCellDidSelected:(MessageCell *)cell;

- (void)messageCellDidLongPress:(MessageCell *)cell;

- (void)messageCellDidResend:(BTMessageModel *)Model;

- (void)didSelecedUserHead:(MessageCell*)cell;

- (void)messageCellDidClickUrl:(NSString *)url;

@end

NS_ASSUME_NONNULL_END
